#pragma once

#include <windows.h>
#include <d3d9.h>
#include <d3dx9.h>
#include "SdkMesh.h"
#include "Options.h"

LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
HRESULT InitializeWindow(HWND* pHwnd);

HRESULT ReadOptions(int argc, LPWSTR args[], Options* pOptions);
HRESULT Initialize(Options options, LPDIRECT3DDEVICE9* ppDevice);
HRESULT Load(LPDIRECT3DDEVICE9 pDevice, Options options, LPD3DXMATERIAL* pMaterials, DWORD* nMaterials, LPD3DXMESH* pMesh);
HRESULT Convert(LPD3DXMATERIAL materials, DWORD nMaterials, LPD3DXMESH mesh, Options options, SDKMESH* pSdkMesh);
HRESULT Save(SDKMESH sdkMesh, Options options);